import axios from 'axios'
let config = null
if (process.env.NODE_ENV === 'development') {
    config = {
        timeout: 5000,
        headers: {'X-Requested-With': 'XMLHttpRequest'}
    }
} else {
    config = {
        baseURL: process.env.BASE_API, // api的base_url
        timeout: 5000,
        headers: {'X-Requested-With': 'XMLHttpRequest'}
    }
}
const service = axios.create(config)
export default service
